package com.clw.repository;

import com.clw.dataobject.Buyer;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.JpaRepository;


/**
 * Created by Administrator on 2017-12-15.
 */
public interface BuyerRepository extends JpaRepository<Buyer,Integer>{

    Buyer findByName(String name);

    Page<Buyer> findAll(Specification<Buyer> spec, Pageable pageable);

    Long count(Specification<Buyer> spec);

    Buyer findById(Integer id);
}
